//
//  GoOutAcePackAuthorsInfoCell.m
//  ArtOfLiving
//
//  Created by 刘虎 on 16/5/5.
//  Copyright © 2016年 刘虎. All rights reserved.
//

#import "GoOutAcePackAuthorsInfoCell.h"
#import "GoOutAuthorsModel.h"

@interface GoOutAcePackAuthorsInfoCell ()

@property (weak, nonatomic) IBOutlet UIImageView *autherImageView;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *infoLabel;

@end

@implementation GoOutAcePackAuthorsInfoCell

- (void)awakeFromNib {
    
    [super awakeFromNib];
    self.autherImageView.layer.cornerRadius = 20.0f;
    self.autherImageView.layer.masksToBounds = YES;
}

- (void)setCellWithModel:(id)model {
    
    GoOutAuthorsModel *authorModel = model;
    self.nameLabel.text = authorModel.username;
    self.infoLabel.text = authorModel.intro;
    SDWebImageOptions options = SDWebImageRetryFailed | SDWebImageLowPriority;
    [self.autherImageView sd_setImageWithURL:[NSURL URLWithString:authorModel.avatar] placeholderImage:[UIImage imageNamed:@"travelPlaceholder.png"] options:options];
}


@end
